import React from "react";
import { RouteObject } from "@/routes/interface";
import Layout from "@/layouts";
import lazyLoad from "@/routes/utils/lazyLoad";

const product: Array<RouteObject> = [
	{
		element: <Layout />,
		meta: {
			title: "书架管理",
			key: "bookshelf"
		},
		children: [
			{
				path: "/bookshelf/list",
				element: lazyLoad(React.lazy(() => import("@/pages/bookshelf/List/index"))),
				meta: {
					title: "书籍管理",
					requiresAuth: true,
					key: "/bookshelf/list",
					icon: ""
				}
			},
			{
				path: "/bookshelf/add",
				element: lazyLoad(React.lazy(() => import("@/pages/bookshelf/Add/index"))),
				meta: {
					title: "新增书籍",
					requiresAuth: true,
					key: "/bookshelf/add",
					icon: ""
				}
			},
			{
				path: "/bookshelf/content",
				element: lazyLoad(React.lazy(() => import("@/pages/bookshelf/SectionModule/index"))),
				meta: {
					title: "录入内容",
					requiresAuth: true,
					key: "/bookshelf/content",
					icon: ""
				}
			}
		]
	}
];

export default product;
